import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

const store = new Vuex.Store({
  state: {
    cms_token: null
  },
  mutations: {
    cms_tokenSync(state) {
      state.cms_token = sessionStorage.getItem('cms_token') ? sessionStorage.getItem('cms_token') : null;
    }
  },
  getters: {
    token(state) {
      return state.cms_token;
    }
  },
});
export default store;
